<!DOCTYPE html>
<html lang="en">
<head>
    {include file='./head_template'/}
</head>

<body>

<div id="wrapper">
    {include file='./nav_template'/}

    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">导航菜单与类别管理</h1>
            </div>
            <!-- /.col-lg-12 -->
        </div>
        <!-- /.row -->

        <div class="row">
            <div class="col-sm-6">
                <div class="panel panel-default">
                    <div class="panel-heading clearfix">
                        轮播图管理
                        <div class="pull-right">
                            <form action="addImg.phpublic/index.php" method="post" enctype="multipart/form-data">
                                <button type="submit" class="btn btn-success btn-sm">上传</button>
                            <div class="file-container" style="display:inline-block;position:relative;overflow: hidden;vertical-align:middle">
                                <button class="btn btn-success btn-sm fileinput-button" type="button">添加图片</button>
                                <input type="file" id="jobData" onchange="loadFile(this.files[0])" style="position:absolute;top:0;left:0;font-size:34px; opacity:0" name="file">
                            </div>
                            <span id="filename" style="vertical-align: middle">未上传文件</span>
                            </form>
                        </div>
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <table width="100%" class="table table-striped table-bordered table-hover" id="dataTables-example">
                            <thead>
                            <tr>
                                <th>菜单名</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php foreach ($rowsLunboImg as $row):?>
                                <tr class="odd gradeX">
                                    <td><img src="<?php echo $row["lunbo_name"]?>" width="100%" height="200px"/></td>
                                    <td>
                                        <form action="updateImg.php" method="post" enctype="multipart/form-data">
                                            <!--<input value="<?php /*echo $row['id']*/?>" name="id"/>-->
                                            <button type="submit" class="btn btn-warning btn-sm">修改</button>
                                            <div class="file-container" style="display:inline-block;position:relative;overflow: hidden;vertical-align:middle">
                                                <button class="btn btn-warning btn-sm fileinput-button" type="button">添加图片</button>
                                                <input type="file" id="jobData" onchange="loadFile(this.files[0])" style="position:absolute;top:0;left:0;font-size:34px; opacity:0" name="file">
                                            </div>
                                        </form>
                                        <a class="btn btn-danger btn-sm" href="doAction.phplic/index.php?act=delImg&name='lunboImg'&id=<?php echo $row['id']?>">删除</a>
                                    </td>
                                </tr>
                            <?php endforeach;?>
                            </tbody>
                        </table>

                    </div>
                    <!-- /.panel-body -->
                </div>
                <!-- /.panel -->
            </div>
            <div class="col-sm-6">
                <div class="panel panel-default">
                    <div class="panel-heading clearfix">
                        跑马灯图管理
                        <div class="pull-right">
                            <form action="addImg.phpublic/index.php" method="post" enctype="multipart/form-data">
                                <button type="submit" class="btn btn-success btn-sm">上传</button>
                                <div class="file-container" style="display:inline-block;position:relative;overflow: hidden;vertical-align:middle">
                                    <button class="btn btn-success btn-sm fileinput-button" type="button">添加图片</button>
                                    <input type="file" id="jobData" onchange="loadFile(this.files[0])" style="position:absolute;top:0;left:0;font-size:34px; opacity:0" name="file">
                                </div>
                                <span id="filename" style="vertical-align: middle">未上传文件</span>
                            </form>
                        </div>
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <table width="100%" class="table table-striped table-bordered table-hover" id="dataTables-example1">
                            <thead>
                            <tr>
                                <th>菜单名</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php foreach ($rowsPaoMaDengImg as $row):?>
                                <tr class="odd gradeX">
                                    <td><img src="<?php echo $row["paomadeng_name"]?>" width="100%" height="200px"/></td>
                                    <td>
                                        <form action="updateImg.php" method="post" enctype="multipart/form-data">
                                            <button type="submit" class="btn btn-warning btn-sm">修改</button>
                                            <div class="file-container" style="display:inline-block;position:relative;overflow: hidden;vertical-align:middle">
                                                <button class="btn btn-warning btn-sm fileinput-button" type="button">添加图片</button>
                                                <input type="file" id="jobData" onchange="loadFile(this.files[0])" style="position:absolute;top:0;left:0;font-size:34px; opacity:0" name="file">
                                            </div>
                                        </form>
                                        <a class="btn btn-danger btn-sm" href="doAction.phplic/index.php?act=delImg&name='paomadengImg'&id=<?php echo $row['id']?>">删除</a>
                                    </td>
                                </tr>
                            <?php endforeach;?>
                            </tbody>
                        </table>

                    </div>
                    <!-- /.panel-body -->
                </div>
                <!-- /.panel -->
            </div>
            <div class="col-sm-6">
                <div class="panel panel-default">
                    <div class="panel-heading clearfix">
                        信息快讯图管理
                        <div class="pull-right">
                            <form action="addImg.phpublic/index.php" method="post" enctype="multipart/form-data">
                                <button type="submit" class="btn btn-success btn-sm">上传</button>
                                <div class="file-container" style="display:inline-block;position:relative;overflow: hidden;vertical-align:middle">
                                    <button class="btn btn-success btn-sm fileinput-button" type="button">添加图片</button>
                                    <input type="file" id="jobData" onchange="loadFile(this.files[0])" style="position:absolute;top:0;left:0;font-size:34px; opacity:0" name="file">
                                </div>
                                <span id="filename" style="vertical-align: middle">未上传文件</span>
                            </form>
                        </div>
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <table width="100%" class="table table-striped table-bordered table-hover" id="dataTables-example2">
                            <thead>
                            <tr>
                                <th>图片</th>
                                <th>文章</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php foreach ($rowsInformationImg as $row):?>
                                <tr class="odd gradeX">
                                    <td><img src="<?php echo $row["name"]?>" width="100%" height="200px"/></td>
                                    <td><?php echo $row["article_id"]?></td>
                                    <td>
                                        <button class="btn btn-warning btn-sm">修改</button>
                                        <a class="btn btn-danger btn-sm" href="doAction.phplic/index.php?act=delImg&name='informationImg'&id=<?php echo $row['id']?>">删除</a>
                                    </td>
                                </tr>
                            <?php endforeach;?>
                            </tbody>
                        </table>

                    </div>
                    <!-- /.panel-body -->
                </div>
                <!-- /.panel -->
            </div>
        </div>
    </div>
    <!-- /#page-wrapper -->
</div>
<script>
    function loadFile(file){
        $("#filename").html(file.name);
    }
</script>
{include file='./foot_template'/}
</body>

</html>
